/** * 404 */
<template>
  <div class="page-404">
    <h1 @click="back">回到首页</h1>
    <h2>Sorry, 页面没找到，或者没有权限访问！</h2>
  </div>
</template>
<script>
export default {
  // 模块名字

  methods: {
    back() {
      let info = JSON.parse(localStorage.getItem("info"));
      let isRole = !info.isAdministrator && info.auth.length == 0;
      if (isRole) {
        localStorage.clear();
        this.$router.push("/login");
      } else {
        this.$router.push("/system/user");
      }
    }
  }
};
</script>
<style scoped>
.page-404 {
  text-align: center;
  background: url("https://img.zcool.cn/community/01545d58d24b61a801219c77a15519.png@1280w_1l_2o_100sh.png")
    no-repeat;
  background-size: 100% 100%;
  height: 100vh;
}
.page-404 h1 {
  position: absolute;
  border: 1px solid #ccc;
  height: 60px;
  text-align: center;
  cursor: pointer;
  font-size: 28px;
  line-height: 60px;
  bottom: 20%;
  padding: 0 20px;
  border-radius: 10px;
  color: #fff;
  background-color: #2628b6;
  left: 45vw;
  font-weight: 700;
  text-shadow: rgba(61, 61, 61, 0.3) 1px 1px, rgba(61, 61, 61, 0.2) 2px 2px,
    rgba(61, 61, 61, 0.3) 3px 3px;
}
.page-404 h2 {
  position: absolute;
  bottom: 13%;
  left: 35vw;
  line-height: 30px;
  font-size: 30px;
}
</style>
